package com.spring.framework.model.xml.inject;

import java.util.*;

public class CollectionInject {

	//集合属性注入

	private List<Object> list;
	private Set<Object> set;
	private Map<Object, Object> map;
	private Properties properties;
	private Object[] array;

	public CollectionInject(List<Object> list, Set<Object> set, Map<Object, Object> map, Properties properties, Object[] array) {
		this.list = list;
		this.set = set;
		this.map = map;
		this.properties = properties;
		this.array = array;
	}

	static class CollectionInner {
		private String property1;
		private int property2;


		public void setProperty1(String property1) {
			this.property1 = property1;
		}

		public void setProperty2(int property2) {
			this.property2 = property2;
		}

		@Override
		public String toString() {
			return "CollectionInner{" +
					"property1='" + property1 + '\'' +
					", property2=" + property2 +
					'}';
		}
	}

	@Override
	public String toString() {
		return "CollectionDI{" +
				"\n" + "list=" + list +
				"\n" + ", set=" + set +
				"\n" + ", map=" + map +
				"\n" + ", properties=" + properties +
				"\n" + ", array=" + Arrays.toString(array) +
				'}';
	}
}
